<ValidateForm class="form-inline" Model="@Model" OnSubmit="@OnSubmit">
    <div class="row">
        <div class="form-group col-12">
            <BootstrapInput placeholder="请输入 ..." @bind-Value="@Model.Name">
            </BootstrapInput>
        </div>
        <div class="form-group col-12">
            <Button ButtonType="ButtonType.Submit" Text="提交表单"></Button>
        </div>
    </div>
</ValidateForm>

@code {
    
    private Task OnSubmit(EditContext context)
    {
        Trace.Log("OnSubmit 回调委托");
        return Task.CompletedTask;
    }
    
    private Logger Trace { get; set; }
    
    private Foo Model = new Foo();

    private class Foo
    {
        [Required]
        [DisplayName("姓名")]
        public string? Name { get; set; }
    }    
}